<?php

/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Sitealbum
 * @copyright  Copyright 2010-2011 BigStep Technologies Pvt. Ltd.
 * @license    http://www.socialengineaddons.com/license/
 * @version    $Id: Menus.php 2011-08-026 9:40:21Z SocialEngineAddOns $
 * @author     SocialEngineAddOns
 */

class Sitealbum_Plugin_Menus {

  public function canCreateBadge() {
    // Must be logged in
    $viewer = Engine_Api::_()->user()->getViewer();
    if (!$viewer || !$viewer->getIdentity()) {
      return false;
    }
    
    // Badge is Enable or Not
    $badge_enable = Engine_Api::_()->getApi('settings', 'core')->getSetting('sitealbum.photo.badge', 1);
    if (empty($badge_enable)) {
      return false;
    }
    return true;
  }

}